package com.example.demo.pojo

import lombok.ToString
import org.springframework.boot.context.properties.ConfigurationProperties
import org.springframework.context.annotation.PropertySource
import org.springframework.stereotype.Component


@Component
@ConfigurationProperties(prefix = "user")
@PropertySource("classpath:MyConfig.properties", encoding = "utf-8")
@ToString
class ConfigStu {
    var name2: String? = null
    var age2: Int? = null
    override fun toString(): String {
        return "name:${name2} age2:${age2} "
    }
}